import requests
import ssl
import json

url = "https://192.168.1.10:8080/configure"
payload={'data': '[{"op": "set", "path": [ "firewall", "name", "APP_POLICY", "default-action", "drop"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "10", "state", "established", "enable"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "10", "action", "accept"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "20", "state", "new", "enable"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "20", "action", "drop"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "20", "destination", "group", "network-group", "USERS"]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "20", "source", "group", "network-group", "APP" ]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "30", "state", "new", "enable" ]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "30", "action", "accept" ]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "30", "destination" ]}, \
   {"op": "set", "path": [ "firewall", "name", "APP_POLICY", "rule", "30", "source", "group", "network-group", "APP" ]}, \
   {"op": "set", "path": [ "interfaces", "ethernet", "eth1", "vif", "20", "firewall", "in", "name", "APP_POLICY"]} ]',
        'key': 'PS-HTTPS-API-PLAINTEXT-KEY'}
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
print(response.text)
